﻿using System;
using ORS.OrderRobot.ServiceContracts.Dtos;
using ORS.OrderRobot.ServiceContracts.Dtos.Api;

namespace ORS.OrderRobot.ServiceContracts.ThridPartApi
{
	/// <summary>
	/// 购物下单接口
	/// </summary>
	public interface IThirdBasketService
	{
		/// <summary>
		/// 商品添加到购物车
		/// </summary>
		/// <param name="input"></param>
		/// <param name="commonInput"></param>
		/// <returns>添加成功，返回响应正文</returns>
		Task<BasketDto?> AddProductToBasket(ShoppingInput input, CommonInput commonInput);
		/// <summary>
		/// 获取购物车详情
		/// </summary>
		/// <param name="commonInput"></param>
		/// <returns></returns>
		Task<BasketDto> GetBasketDetail(CommonInput commonInput);
		/// <summary>
		/// 设置航班信息
		/// </summary>
		/// <param name="input"></param>
		/// <param name="commonInput"></param>
		/// <returns></returns>
		Task SetFlight(DepatureInput input,CommonInput commonInput);
		/// <summary>
		/// 设置购物篮子的用户信息(正常情况下，刚注册完成的用户就有)
		/// </summary>
		/// <param name="input"></param>
		/// <returns></returns>
		Task SetBasketCustomerInfo(BasketCustomerInput input, CommonInput commonInput);
		/// <summary>
		/// 设置收货地址
		/// </summary>
		/// <param name="input"></param>
		/// <param name="commonInput"></param>
		/// <returns></returns>
		Task SetShipments(ShipmentInput input, CommonInput commonInput);
		/// <summary>
		/// 设置账单地址
		/// </summary>
		/// <param name="input"></param>
		/// <param name="commonInput"></param>
		/// <returns></returns>
		Task SetBillingAddress(BillingAddressInput input,CommonInput commonInput);
		/// <summary>
		/// 设置支付方式
		/// </summary>
		/// <param name="input"></param>
		/// <param name="commonInput"></param>
		/// <returns></returns>
		Task SetPayment(PaymentInput input,CommonInput commonInput);
		/// <summary>
		/// 创建订单(创建成功后会自动将购物车回滚为初始状态：清除航班信息、账单地址、收货信息)
		/// </summary>
		/// <param name="input"></param>
		/// <returns></returns>
		Task<OrderResDto> CreateOrder(OrdersInput input, CommonInput commonInput);
		/// <summary>
		/// 创建购物车
		/// </summary>
		/// <param name=""></param>
		/// <returns></returns>
		Task<BasketDto> CreateBasket(CreateBasketInput input, CommonInput commonInput);
        /// <summary>
        /// 删除购物车中的某个商品
        /// </summary>
        /// <param name="itemId"></param>
        /// <param name="commonInput"></param>
        /// <returns></returns>
        Task RemoveBasketItem(string itemId, CommonInput commonInput);
		/// <summary>
		/// 取消订单
		/// </summary>
		/// <param name="orderNo"></param>
		/// <param name="commonInput"></param>
		/// <returns></returns>
		Task CancelOrder(string orderNo, CommonInput commonInput);
    }
}

